import request from "@/server/request.js";

// 策略列表
export const listlApi = (params) => {
	return new request().requestGet(`/api/strategy/list`, params);
};

// 策略详情基本信息
export const basicInfoApi = (id, params = {}) => {
	return new request().requestGet(`/api/strategy/${id}/basicInfo`, params);
};

// 指定策略的收益
export const profitApi = (id, params = {}) => {
	return new request().requestGet(`/api/strategy/${id}/profit`, params);
};

// 指定策略的收益率
export const returnRateApi = (id, params = {}) => {
	return new request().requestGet(`/api/strategy/${id}/returnRate`, params);
};

// 指定策略的订单列表
export const ordersApi = (id, params = {}) => {
	return new request().requestGet(`/api/strategy/${id}/orders`, params);
};

// 策略购买基础信息
export const purchaseApi = (id, params = {}) => {
	return new request().requestGet(`/api/strategy/${id}/purchase`, params);
};

// 策略购买
export const buyApi = (id, params = {}) => {
	return new request().requestPost(`/api/strategy/${id}/purchase`, params);
};